package com.zhangjingcheng.yunyixia.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhangjingcheng.yunyixia.pojo.entity.Category;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface CategoryMapper extends BaseMapper<Category> {
    @Select("select c.id from category c left join file f on c.id = f.category_id" +
            " where f.id = #{fileId}")
    Integer findByFileId(Integer fileId);
}
